﻿@inherits LayoutComponentBase

<div class="sidebar">
  <NavMenu />
</div>

<div class="main">
  <div class="top-row px-4">
    <AuthorizeView>
      <Authorized>
        Hello, @context.User.Identity.Name
        @if (App.IsServerSide)
        {
          <form method="post" action="/Account/Logout">
            <button type="submit" class="nav-link btn btn-link">Log out</button>
          </form>
        }
        else
        {
          <a href="Account/Logout">Log out</a>
        }
      </Authorized>
      <NotAuthorized>
        <a href="/Account/Login">Log in</a>
      </NotAuthorized>
    </AuthorizeView>
    <a href="https://cslanet.com" target="_blank">About</a>
  </div>

  <div class="content px-4">
    @Body
  </div>
</div>
